package com.example.javacrawl.worker;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;

import javax.annotation.PostConstruct;

@Configuration
@EnableAsync
public class WorkerManager {

    @Autowired
    private DynamicGetDataWorker dynamicGetDataWorker;

    @PostConstruct
    public void init(){
        dynamicGetDataWorker.work();
    }
}
